// 复习传引用调用: 指针与结构

#include <iostream>
using namespace std;

struct Struct1 {
    int a, b;
};

struct Struct2 {
    int d, e;
};

void GiveMe2Structs(Struct1* s1, Struct2* s2);

int main() {
    Struct1 s1;
    Struct2 s2;
    GiveMe2Structs(&s1, &s2);

    cout << "程序GiveMe2Structs使用指针的情况。\n";
    cout << "第一个结构包含 " << s1.a << " 和 " << s1.b << "\n";
    cout << "第二个结构包含 " << s2.d << " 和 " << s2.e << "\n";
    cout << "完毕\n";
}

void GiveMe2Structs(Struct1* s1, Struct2* s2) {
    s1->a = 7;
    s1->b = 1;

    s2->d = 3;
    s2->e = 5;
}
